# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gst-plugins-ugly
pkgver=1.18.5
pkgrel=1
pkgdesc="Multimedia graph framework - ugly plugins"
url="https://gstreamer.freedesktop.org/"
arch=(x86_64)
license=(LGPL)
depends=(gst-plugins-base-libs libdvdread libmpeg2 a52dec libsidplay libcdio
         x264 opencore-amr)
makedepends=(python git meson)
_commit=bd1dfb44475ab04d42b217acdf90942e0b7893b5  # tags/1.18.5^0
source=("git+https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build \
    -D doc=disabled \
    -D gobject-cast-checks=disabled \
    -D package-name="GStreamer Ugly Plugins (Arch Linux)" \
    -D package-origin="https://www.archlinux.org/"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
